<template>
    <div class="time-p">
        {{ time }}
    </div>
</template>
<script setup lang="ts">
import dayjs from 'dayjs';
import { onMounted, ref } from 'vue';

const time = ref('')
onMounted(() => {
    setInterval(() => {
        time.value = dayjs().format('YYYY-MM-DD HH:mm:ss')
    })
})
</script>
<style scoped >
.time-p{
    font-size: 1.5vh;
    color: #fff;
    background: #00000099;
    padding: 0.5vh 0.5vw;
}
</style>